package edu.fiu.cis.personalize.server;

import edu.fiu.cis.personalize.server.graph.NodeType;

public class UpdateElement {
	private int id;
	private NodeType type;

	public UpdateElement(int id, NodeType type) {
		super();
		this.id = id;
		this.type = type;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public NodeType getType() {
		return type;
	}

	public void setType(NodeType type) {
		this.type = type;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UpdateElement other = (UpdateElement) obj;
		if (id != other.id)
			return false;
		if (type != other.type)
			return false;
		return true;
	}

}
